package com.zmn.oms.model.entity.work.list;

import com.zmn.oms.model.entity.work.OrderBaseEsQuery;
import com.zmn.oms.model.es.ZmnEsFieldType;
import com.zmn.oms.model.es.ZmnToEs;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

/**
 * 类描述： 大客户单
 *
 * @author lujia
 * @date 2018/11/23 20:01
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class OrderWorkBCustomerQuery extends OrderBaseEsQuery {

    /**
     * 用户名 （客户名称 ？ ）
     */
    @ZmnToEs(map = "contact.userName", type = ZmnEsFieldType.Text)
    private String userName;

    /**
     * 大客户Id 集合 （维保管家  根据管家查出所管大客户Id集合查询）
     */
    @ZmnToEs(map = "userId", type = ZmnEsFieldType.Arr)
    private List<Long> userIdList;

    /**
     * 订单号
     */
    @ZmnToEs(map = {"id", "codeEnd6"}, type = ZmnEsFieldType.Or)
    private String code;

    /**
     * 联系人
     */
    @ZmnToEs(map = "contact.contactName", type = ZmnEsFieldType.Text)
    private String contactName;

    /**
     * 联系电话
     */
    // @ZmnToEs(map = {"contact.queryPhone", "contact.phoneEnd4"}, type = ZmnEsFieldType.Or)
    private String telephone;

    /**
     * 服务分类
     */
    @ZmnToEs(map = "servCategId", type = ZmnEsFieldType.Integer)
    private Integer servCategId;

    /**
     * 产品大类
     */
    @ZmnToEs(map = "categOneId", type = ZmnEsFieldType.Integer)
    private Integer categOneId;

    /**
     * 订单状态
     */
    @ZmnToEs(map = "status", type = ZmnEsFieldType.Integer)
    private Integer status;

    /**
     * 订单来源类型
     */
    @ZmnToEs(map = "sourceType", type = ZmnEsFieldType.Integer)
    private Integer sourceType;

    /**
     * 下单时间 格式 startTime,endTime
     */
    @ZmnToEs(map = "receiveTime", type = ZmnEsFieldType.Date)
    private String receiveTime;

    /**
     * 金额 startAmount, endAmount
     */
    @ZmnToEs(map = "totalAmount", type = ZmnEsFieldType.IntegerRange)
    private String amountRange;

}
